﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ODS.Utils
{
    public class InfoResult
    {
        String error;

        public String Error
        {
            get { return error; }
            set {
                if (value == null)
                    IsSuccess = true;
                else
                    IsSuccess = false;
                error = value;
            }
        }

        bool isSuccess;

        public bool IsSuccess
        {
            get { return isSuccess; }
            set { isSuccess = value; }
        }

        Object result;

        public Object ReturnedObject
        {
            get { return result; }
            set { result = value; }
        }

        public InfoResult(String _err, Object obj)
        {
            Error = _err;
            ReturnedObject = obj;
        }
    }
}
